]> dgit.raspbian.org Git - gnome-shell.git/commit
shell: Fix pixbuf reference leak saving screenshots
authorDmitrii Naidolinskii <horisontdawn@yandex.ru>
Sun, 28 Aug 2022 11:37:54 +0000 (16:37 +0500)
committerDmitrii Naidolinskii <horisontdawn@yandex.ru>
Sun, 28 Aug 2022 11:37:54 +0000 (16:37 +0500)
commitf5754adb681d55e985147b56de9c2b30c8cbc9f1
tree985634dd39a21bf1660311e06e20b4f20eca8137
parentf50110e8c4f227f3c322b3cdbaf33c4b8e34dbdb
shell: Fix pixbuf reference leak saving screenshots

When saving a screenshot, the GdkPixbuf created would be left
with a dangling reference after saving to disk (either leaked
on errors, or via an extra reference on success). Always unref
the pixbuf so it's either destroyed on error or there is a single
reference fully transferred to the caller of the function.

Closes: https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/5501
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2449>
src/shell-screenshot.c